var sw = document.querySelector('.swiper-wrapper')
var lunbo = [
  'image/zhengzhuang.png'
]

for(let i = 0; i < lunbo.length; i++){
  var div = document.createElement('div')
  div.className = 'swiper-slide'
  var img = document.createElement('img')
  img.src = lunbo[i]
  div.appendChild(img)
  sw.appendChild(div)
}
// 初始化swiper
var swiper = new Swiper(".swiper", {
  // loop: true, // 循环模式选项
  // effect:'cube',
  autoplay:true,

  pagination: {
    // el: ".swiper-pagination",
  },
});


// var xhr = new XMLHttpRequest()
// xhr.open('get','http://47.116.75.38:8101/front/getSymptomInfo')
// xhr.send(null)
// xhr.onload = function () {
//   var res = JSON.parse(xhr.response)
//   console.log(res)
// }


var zz = [
  '流口水',
  '不会咀嚼',
  '讲话晚',
  '胆小',
  '不会讲话'
]

var imgs = [
  'image/etfz.jpg',
  'image/etfz-1.jpg',
  'image/etfz-2.jpg',
  'image/etfz3.jpg',
]

var list = document.querySelector('.main-list')

for(let i = 0; i < 10; i++){
    var div = document.createElement('div')
    div.className = 'tit-zb'

    var h3 = document.createElement('h3')
    h3.innerText = zz[Math.floor(Math.random()*zz.length)]

    var div1 = document.createElement('div')
  div1.className = 'zb-i'

  var img = document.createElement('img')
  img.src = imgs[Math.floor(Math.random()*imgs.length)]

  var p = document.createElement('p')
  p.innerText = '您的孩子是否有以下表现：多以单音、叠音为主,表达简短，只能用１~２个字回答问句,说话断续不成句,主动表达少,语言表达能力比同龄人落后'

  div1.appendChild(img)
  div1.appendChild(p)

  var a = document.createElement('a')
  a.innerText = '阅读更多'

  div.appendChild(h3)
  div.appendChild(div1)
  div.appendChild(a)

  list.appendChild(div)
}
